# -*- coding: utf-8 -*-
#fpath = r'/home/xiaohua/data/capture_form_pi/cmd_shell/info_pic.txt'
#with open(fpath, 'r') as f:
#    s = f.read()
#    print(s)

#!/usr/bin/env python 

'readFile.py -- read and display file'
  
# get filename 
fname = r'/home/xiaohua/data/capture_form_pi/cmd_shell/info_pic.txt'
print  
  
# attempt to open file for reading 
try: 
  fobj = open(fname, 'r') 
except IOError, e: 
  print "***** file open error:", e 
else: 
  # display contents to the screen 
  for eachLine in fobj: 
    print eachLine, 
  fobj.close()